home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / LinkList / c / InList < prev    next >
Text File  |  1995-07-08  |  1KB  |  38 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    LinkList.InList.c
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.02 (16 Mar 1992)
  14.     Purpose: Linked list handling functions
  15. */
  16.  
  17.  
  18. #include <stdlib.h>
  19. #include <stdio.h>
  20.  
  21. #include "DeskLib:LinkList.h"
  22.  
  23. extern BOOL LinkList_InList(linklist_header *anchor, linklist_header *item)
  24. {
  25.   linklist_header *ptr;
  26.  
  27.   ptr = anchor->next;
  28.   while (ptr != NULL)
  29.   {
  30.     if (ptr == item)                               /* compare item ADDRESSES */
  31.       return(TRUE);
  32.  
  33.     ptr = ptr->next;
  34.   }
  35.  
  36.   return(FALSE);
  37. }
  38.